package com.recharge.common.enums;

public enum ErrorCode {

    SYSTEM_SUCCESS(200, "操作成功"),

    NOT_LOGIN(401, "未登陆"),

    UNAUTHORIZED_EXCEPTION(403, "权限不足"),

    SYSTEM_EXCEPTION(500, "系统繁忙"),

    SYSTEM_COPY_OBJECT_ERROR(500, "复制对象错误"),

    EXCEL_EXPORT_ERROR(500, "EXCEL导出失败"),


    /**
     * 1001-1999 用户相关状态码
     */
    USER_ADD_ERROR(1001, "添加用户失败"),

    USER_EDIT_ERROR(1002, "修改用户失败"),

    USER_DELETE_ERROR(1003, "删除用户失败"),

    USER_GET_ERROR(1004, "获取用户失败"),

    USER_LIST_ERROR(1005, "获取用户列表失败"),

    USER_DOES_NOT_EXIST(1006, "用户名不存在"),

    USER_EDIT_PASSWORD_ERROR(1007, "用户修改失败"),

    USER_NAME_IS_EXIST(1008, "用户名已存在"),

    USER_LOGIN_IS_NO_EXIST(1009, "登陆用户不存在"),

    USER_ACCOUNT_PASSWORD_ERROR(1010, "账号密码错误"),



    /**
     * 2001-2999系统角色状态码
     */
    ROLE_ADD_ERROR(2001, "添加角色失败"),

    ROLE_EDIT_ERROR(2002, "修改角色失败"),

    ROLE_DELETE_ERROR(2003, "删除角色失败"),

    ROLE_GET_ERROR(2004, "获取角色失败"),

    ROLE_LIST_ERROR(2005, "获取角色列表失败"),

    ROLE_BIND_USER_ERROR(2006, "用户绑定角色失败"),

    ROLE_UNBIND_USER_ERROR(2007, "用户解除绑定角色失败"),

    ROLE_UNBIND_USER_ALL_ERROR(2008, "用户全部角色解除绑定失败"),

    ROLE_CODE_EXIT(2010, "角色编码已存在"),



    /**
     * 3001-3999 系统权限状态码
     */
    PERMISSION_ADD_ERROR(3001, "添加权限失败"),

    PERMISSION_EDIT_ERROR(3002, "修改权限失败"),

    PERMISSION_DELETE_ERROR(3003, "删除权限失败"),

    PERMISSION_GET_ERROR(3004, "获取权限失败"),

    PERMISSION_LIST_ERROR(3005, "获取权限列表失败"),

    PERMISSION_BIND_ROLE_ERROR(3006, "角色绑定权限失败"),

    PERMISSION_UNBIND_ROLE_ALL_ERROR(3007, "角色全部权限解除绑定失败"),

    PERMISSION_GET_NODE_LIST_ERROR(3008, "角色全部权限解除绑定失败"),


    /**
     * 4000-4999 字典模块 状态码
     */
    DICTIONARY_EDIT_ERROR(4002, "修改字典失败"),

    DICTIONARY_DELETE_ERROR(4003, "删除字典失败"),

    DICTIONARY_GET_ERROR(4004, "获取字典失败"),

    DICTIONARY_LIST_ERROR(4005, "获取字典列表失败"),

    DICTIONARY_ADD_ERROR(4006, "添加字典列表失败"),




    /**
     * 5000-5999 参数模块 状态码
     */
    PARAM_EDIT_ERROR(5002, "修改参数失败"),

    PARAM_DELETE_ERROR(5003, "删除参数失败"),

    PARAM_GET_ERROR(5004, "获取参数失败"),

    PARAM_LIST_ERROR(5005, "获取参数列表失败"),

    PARAM_VERIFICATION_ERROR(5006,"表单验证失败"),

    PARAM_TEMPLATE_ERROR(5007, "模板参数验证失败"),

    PARAM_LOGIN_USER_ERROR(5008, "获取登录用户信息失败"),



    /**
     * 6000-6999 商品模块 状态码
     */
    GOODS_STATUS_ERROR(6001, "商品状态错误"),

    GOODS_ADD_ERROR(6003, "添加商品失败"),

    GOODS_EDIT_ERROR(6004, "修改商品失败"),

    GOODS_DELETE_ERROR(6005, "删除商品失败"),

    GOODS_ADD_EXIST_ERROR(6005, "商品名称已存在"),

    GOODS_ADD_RELATION_PROVIDER_ERROR(6006, "添加商品关联供货商失败"),

    GOODS_EDIT_RELATION_PROVIDER_ERROR(6007, "修改商品关联供货商失败"),

    GOODS_DELETE_RELATION_PROVIDER_ERROR(6008, "删除商品关联供货商失败"),

    GOODS_ADD_GROUP_ERROR(6009, "添加商品关联供货商失败"),

    GOODS_EDIT_GROUP_ERROR(6011, "修改商品关联供货商失败"),

    GOODS_DELETE_GROUP_ERROR(6012, "删除商品关联供货商失败"),

    GOODS_DISASSOCIATE_FAILURE(6013, "取消关联商品失败"),

    GOODS_NOT_RELATION_GROUP(6014, "取消关联商品失败"),

    GOODS_OVERSTEP_MAX_NUM(6015, "超出最大数量"),

    GOODS_RELATED_GOODS_EXIST(6016, "存在关联商品"),

    GOODS_EDIT_DISCOUNT_ERROR(6017, "折扣修改失败"),

    GOODS_OUT_OF_STOCK_ERROR(6018, "库存不足"),

    GOODS_MERCHANT_DISCOUNT_ERROR(6019, "代理商与商品价格关联失败"),



    /**
     * 7000-7999 订单 供货单 模块 状态码
     */
    ORDER_PROVIDER_STATUS_ERROR(7001, "供货单状态错误"),

    ORDER_CREATE_ERROR(7002, "订单创建失败"),

    ORDER_EDIT_ERROR(7004, "订单修改失败"),

    ORDER_PROVIDER_EDIT_ERROR(7006, "修改供货单失败"),

    ORDER_NOT_EXITE_ERROR(7007, "订单不存在"),

    ORDER_ADD_PROVIDER(7101, "添加供应单失败"),

    ORDER_EDIT_PROVIDER(7102, "修改供应单失败"),

    ORDER_DELETE_PROVIDER(7103, "删除供应单失败"),

    ORDER_GET_PROVIDER(7104, "获取供应单失败"),

    ORDER_LIST_PROVIDER(7105, "获取供应单列表失败"),

    ORDER_REFUND_ERROR(7106, "成功的订单才能退款"),

    ORDER_REFUND_fFAILED_ERROR(7107, "退款失败"),

    ORDER_SYNC_FAILED_ERROR(7108, "订单同步失败"),



    /**
     * 8000-8999 开放API 状态码
     */
    API_MERCHANT_NOT_EXITE_ERROR(8001, "商户不存在"),

    API_MERCHANT_AUTHEN_ERROR(8002, "商户验证失败"),

    API_MERCHANT_KEY_RESET(8003, "商户秘钥重置失败"),

    API_MERCHANT_ACCOUNT_ERROR(8004, "商户资金账户错误"),

    API_INVALID_REQUEST_ADDRESS_ERROR(8005, "非法的请求地址"),

    API_USER_BALANCE_STATUS_ERROR(8006, "商户余额不足"),

    API_GOODS_NOT_EXITE_ERROR(8007, "商品不存在"),

    API_ORDER_PROVIDER_FAIL(8015, "订单供应失败"),

    API_ORDER_RECHARGE_FAIL(8016, "充值订单添加失败"),

    API_ORDER_NOT_CITY_CODE(8017, "电话充值归属地与充值区域不匹配"),

    API_GOODS_PROVIDER_FAIL(8018,"商品供应失败"),

    API_REQUEST_TIME_ERROR(8019, "请求太过频繁"),

    API_CARD_GOODS_NOT_ERROR(8020, "没有充值卡对应的产品存在"),

    API_CARD_VERIFY_ERROR(8021, "卡密供卡验证错误"),

    API_ORDER_STATUS_NUKNOW(8022, "订单需要手动确认"),

    API_CARD_VOUCHER_ERROR(8023, "获取卡密商失败"),

    API_ORDER_SERVICE_PROVIDER_ERROR(8024, "电话号码和运营商不符合"),

    API_MERCHANET_GOODS_ERROR(8025, "代理商没有关联相应的产品"),

    API_ORDER_NOT_EXIT_ERROR(8026, "订单不存在"),

    API_ORDER_DENOMINATION_ERROR(8027, "订单面值与商品金额不符合"),

    API_PROVIDER_NOT_ERROR(8028, "不是充值卡供应商"),

    API_CARD_GOODS_QUARTITY_ERROR(8029, "卡密的数量和供卡数量不匹配"),

    API_SERVER_REQUEST_FULL(8030, "服务器接收的请求已满"),

    API_GOODS_DISCOUNT_ERROR(8031, "商品销售亏损请设置折扣价格"),


    /**
     * 9000-9999 城市模块 状态码
     */
    REGION_ADD_ERROR(9001, "添加城市失败"),

    REGION_EDIT_ERROR(9002, "修改城市失败"),

    REGION_DELETE_ERROR(9002, "修改城市失败"),




    /**
     * 10000-10999 下游商家模块状态码
     */
    MERCHANT_PAY_ACCOUNT_ADD_ERROR(10007, "添加商户银行账号失败"),

    MERCHANT_PAY_ACCOUNT_EDIT_ERROR(10008, "修改商户银行账号失败"),

    MERCHANT_PAY_ACCOUNT_DELETE_ERROR(10009, "删除商户银行账号失败"),

    MERCHANT_ACCOUNT_ADD_ERROR(10010, "添加代理商资金账号失败"),

    MERCHANT_ACCOUNT_EDIT_ERROR(10011, "修改代理商资金账号失败"),

    MERCHANT_ACCOUNT_DELETE_ERROR(10012, "删除代理商资金账号失败"),

    MERCHANT_ADD_ACCOUNT_ERROR(10013, "添加代理商资金失败"),

    MERCHANT_EDIT_ACCOUNT_ERROR(10014, "修改代理商资金失败"),

    MERCHANT_DELETE_ACCOUNT_ERROR(10015, "删除代理商资金失败"),

    MERCHANT_ADD_ERROR(10016, "添加代理商失败"),

    MERCHANT_EDIT_ERROR(10017, "修改代理商失败"),

    MERCHANT_DELETE_ERROR(10018, "删除代理商失败"),

    MERCHANT_LIST_ERROR(10019, "获取代理商列表失败"),

    MERCHANT_GROUP_ADD_ERROR(10020, "添加代理商分组失败"),

    MERCHANT_GROUP_EDIT_ERROR(10021, "修改代理商分组失败"),

    MERCHANT_GROUP_DELETE_ERROR(10022, "删除代理商分组失败"),

    MERCHANT_GROUP_GET_ERROR(10023, "获取代理商分组失败"),

    MERCHANT_GROUP_LIST_ERROR(10024, "获取代理商分组列表失败"),

    MERCHANT_INFO_ERROR(10025, "获取代理商信息失败"),

    MERCHANT_ACCOUNT_EDIT_NO_AMOUNT_ERROR(10026, "更新代理商待还款金额失败"),

    MERCHANT_ACCOUNT_EDIT_CREDIT_ERROR(10027, "更新代理商待还款金额失败"),


    /**
     * 12000-12999 日志模块状态码
     */
    LOG_ADD_OPERATION_ERROR(12001, "添加操作日志失败"),

    LOG_ADD_LOGIN_ERROR(12002, "添加登陆日志失败"),



    /**
     * 13000-13999 供应商模块状态码
     */
    PROVIDER_ADD_ERROR(13001, "添加供应商失败"),

    PROVIDER_EDIT_ERROR(13002, "修改供应商失败"),

    PROVIDER_DELETE_ERROR(13003, "删除供应商失败"),

    PROVIDER_ADD_SUPPLY_API_ERROR(13004, "添加供货API失败"),

    PROVIDER_EDIT_SUPPLY_API_ERROR(13005, "修改供货API失败"),

    PROVIDER_DELETE_SUPPLY_API_ERROR(13006, "删除供货API失败"),

    PROVIDER_ADD_TRANSACTION_ERROR(13007, "添加交易记录失败"),

    PROVIDER_ADD_PROVIDER_NAME_EXIST_ERROR(13012,"供应商名称已存在"),

    PROVIDER_ADD_MERCHANT_NAME_EXIST_ERROR(13013,"代理商名称已存在"),


    /**
     * 14000-14999 回调信息 状态码
     */
    CALLBACK_ADD_PROVIDER_ERROR(14000, "写入订单回调信息失败"),

    CALLBACK_EDIT_PROVIDER_ERROR(14001, "更新回调信息失败"),

    CALLBACK_FIND_PROVIDER_ERROR(14002, "查询回调信息失败"),

    CALLBACK_MERCHANT_ERROR(14003,"下游商户回调添加失败"),


    /**
     * 15000-15999 黑名单模块状态码
     */
    BLACKLIST_ADD_ERROR(15001, "添加黑名单失败"),

    BLACKLIST_DELETE_ERROR(15003, "删除黑名单失败"),

    BLACKLIST_GET_ERROR(15004, "获取黑名单失败"),

    BLACKLIST_LIST_ERROR(15005, "获取黑名单黑名单列表失败"),


    /**
     * 17000-17999 路由模块 状态码
     */
    ROUTE_ADD_FILTER_ERROR(17001, "添加路由策略失败"),

    ROUTE_EDIT_FILTER_ERROR(17002, "修改路由策略失败"),

    ROUTE_DELETE_FILTER_ERROR(17003, "删除路由策略失败"),

    ROUTE_GET_FILTER_ERROR(17004, "获取路由策略失败"),

    ROUTE_LIST_FILTER_ERROR(17005, "获取路由策略列表失败"),


    /**
     * 18000-18999 提现,退款,交易模块  状态码
     */
    //18000-18099 提现状态码
    WITHDRAWAL_RECORD_ADD_ERROR(18014, "添加提现申请失败"),

    WITHDRAWAL_RECORD_EDIT_ERROR(18010, "修改提现记录失败"),

    WITHDRAWAL_RECORD_DELETE_ERROR(18011, "删除提现记录失败"),

    TEMPLATE_PARAM_TEMPLATE_ERROR(18012,"您有一条提现申请正在审核中, 无法再次申请!"),

    WITHDRAW_AUDIT_ERROR(18013, "提现申请审核失败"),


    //18100-18199 交易记录状态码
    TRANSACTION_EDIT_ERROR(18100, "修改交易记录失败"),

    TRANSACTION_DELETE_ERROR(18101, "删除交易记录失败"),

    TRANSACTION_EDIT_NO_AMOUNT_ERROR(18102, "修改临时信用款还款记录失败"),

    TRANSACTION_EDIT_DEPOSIT_ERROR(18103, "存款修改交易记录失败"),

    TRANSACTION_ADD_ERROR(18104, "添加交易记录失败"),

    TRANSACTION_FIND_ERROR(18105, "查询交易记录失败"),


    //18200-18299 存款 状态码
    DEPOSIT_APPLY_FOR_ERROR(18200,"添加存款申请失败"),

    DEPOSIT_AUDIT_APPLY_FOR_ERROR(18201, "存款申请审核失败"),

    DEPOSIT_DELETE_ERROR(18202, "存款记录删除失败"),

    DEPOSIT_SELECT_ERROR(18203, "存款记录查询失败"),

    DEPOSIT_REPAYMENT_TOO_BIG(18204, "信用还款金额大于待还款金额"),

    DEPOSIT_INFO_GET_ERROR(18205, "获取存款信息失败"),

    DEPOSIT_EDIT_ERROR(18206, "修改存款记录失败"),


    //18300-18399 退款 状态码
    REFUND_USER_STATUS_ERROR(18007, "用户退款失败"),

    VERIFICATION_FAIL(5007, "审核失败"),

    VERIFICATION_STATUS_ERROR(5008,"申请已审核"),

    APPLY_CREDIT_EXITS(5009,"您的固定授信正在审核中, 无法再次申请!"),


    /**
     * 20000-20999  充值卡模块 状态码
     */
    CARD_VOUCHER_ADD_ERROR(20001, "卡密商品添加失败"),

    CARD_VOUCHER_EDIT_ERROR(20002, "修改卡密商品状态失败"),

    CARD_VOUCHER_DELETE_ERROR(20003, "删除卡密商品失败"),

    CARD_VOUCHER_GET_ERROR(20004, "获取卡密商失败"),

    CARD_VOUCHER_LIST_ERROR(20005, "获取卡密商列表失败"),

    CARD_VOUCHER_RECHARGE_INVALID(20006, "卡密无效"),

    CARD_PROVIDER_ADD_PROVIDER_GOODS_ERROR(21001, "添加卡密供应单失败"),

    CARD_PROVIDER_EDIT_PROVIDER_GOODS_ERROR(21002, "修改卡密供应单失败"),

    CARD_PROVIDER_DELETE_PROVIDER_GOODS_ERROR(21003, "删除卡密供应单失败"),

    CARD_PROVIDER_GET_PROVIDER_GOODS_ERROR(21004, "获取卡密供应单失败"),

    CARD_PROVIDER_LIST_PROVIDER_GOODS_ERROR(21005, "获取卡密供应单列表失败"),

    CARD_PROVIDER_ADD_LIST_CARD_VOUCHER_ERROR(21006,"导入卡密供应单失败");





    private int code = 0;

    private String msg = "";

    private ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
